/*
 * ThreeAderessInstruction.h
 *
 *  Created on: 25/05/2010
 *      Author: rodolfo
 */

#ifndef THREEADERESSINSTRUCTION_H_
#define THREEADERESSINSTRUCTION_H_

#include<string>
#include <iostream>

class ThreeAddressInstruction {
	std::string op;
	std::string lhs;
	std::string rhs;
	std::string result;
	int label;

public:
	ThreeAddressInstruction();
	ThreeAddressInstruction( const ThreeAddressInstruction & instruction );
	ThreeAddressInstruction( std::string &op, std::string &lhs, std::string &rhs, std::string &result );
	virtual ~ThreeAddressInstruction();
	const std::string& getLhs() const;
	const std::string &getOp() const;
	const std::string &getResult() const;
	const std::string& getRhs() const;
	int getLabel() const;
	void setLhs( std::string &lhs );
	void setOp( std::string &op );
	void setResult( std::string &result );
	void setRhs( std::string &rhs );
	void setLabel( int label );
	void print();
};

#endif /* THREEADERESSINSTRUCTION_H_ */
